package com.baofu.paycore.service.facade.model;


import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: LZQ
 * Date: 14-11-20
 * Time: 下午6:21
 *
 * 支付返回结果基类
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PayBaseResDTO implements Serializable{

    /**
     * 序列化ID
     */
    private static final long serialVersionUID = 8005063809712045077L;

    /**
     * 业务请求时间
     */
    private Date requestDate;

    /**
     * 请求系统业务编号
     */
    private String requestBizNo;

    /**
     * 交易号
     */
    private String requestOrderNo;

    /**
     * 错误码
     * 非成功时必填
     */
    private String errorCode;

    /**
     * 错误描述
     * 非成功时必填
     */
    private String errorMsg;

    /**
     * 是否为实际结果
     */
    private boolean realRtnFlag;

    /**
     * 宝付订单号
     */
    private String relationNo;

    /**
     * 商户号
     */
    private String merchantNo;

    /**
     * 状态
     * I "待支付"
     * S "支付成功"
     * F "支付失败"
     * C "支付关闭"
     */
    private String status;

    public PayBaseResDTO(String errorCode,String errorMsg,String status){
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.status = status;
    }

    public PayBaseResDTO(String errorCode,String errorMsg,String status, boolean realRtnFlag){
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.status = status;
        this.realRtnFlag = realRtnFlag;
    }
}
